﻿<ClientManagerView:EventResourceDictionary x:Class="FacebookClient.CommonFacebookDataResourcesDictionary"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:Facebook="clr-namespace:Contigo;assembly=Contigo"
    xmlns:FacebookClient="clr-namespace:FacebookClient"
    xmlns:ClientManager="clr-namespace:ClientManager" 
    xmlns:ClientManagerData="clr-namespace:ClientManager.Data"
    xmlns:ClientManagerView="clr-namespace:ClientManager.View"
    xmlns:ClientManagerControls="clr-namespace:ClientManager.Controls">
  <FacebookClient:DateTimeToStringConverter x:Key="DateTimeConverter"/>

  <Style TargetType="{x:Type FacebookClient:FriendButton}" x:Key="LargeFriendButtonStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type FacebookClient:FriendButton}">
          <ClientManagerControls:FacebookImageDragContainer FacebookImage="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Friend.Image}">
            <Button
                RenderTransformOrigin=".5,.5"
                Command="{TemplateBinding Command}"
                CommandParameter="{TemplateBinding CommandParameter}"
                Style="{DynamicResource AnimatedItemButton}"
                RenderTransform="{DynamicResource FriendRenderTransform}">
              <FacebookClient:ShinyImageControl
                Width="126" Height="126" 
                FacebookImage="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Friend.Image}" 
                ShowGlare="False" 
                FacebookImageDimensions="Big" 
                CornerRadius="3"
                ImagePadding="3" 
                PenColor="Silver"
                ActivityColor="White"/>
              <!-- Modern:                 
                ShowGlare="True" 
                CornerRadius="0"
                ImagePadding="6" 
                PenColor="Black"
                ActivityColor="Black"
                FrameColor="{DynamicResource FacebookBlue}" -->
            </Button>
          </ClientManagerControls:FacebookImageDragContainer>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

  <Style TargetType="{x:Type FacebookClient:FriendButton}" x:Key="MediumFriendButtonStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type FacebookClient:FriendButton}">
          <ClientManagerControls:FacebookImageDragContainer FacebookImage="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Friend.Image}">
            <Button x:Name="ActivityButton"
                RenderTransformOrigin="0.5,0.5"
                VerticalAlignment="Top"
                Style="{DynamicResource AnimatedItemButton}"
                Command="{TemplateBinding Command}"
                CommandParameter="{TemplateBinding CommandParameter}"
                RenderTransform="{DynamicResource FriendRenderTransform}">
              <FacebookClient:ShinyImageControl
                  Width="100" Height="100"
                  FacebookImage="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Friend.Image}" 
                  ShowGlare="False"
                  FacebookImageDimensions="Big" 
                  CornerRadius="3" 
                  ImagePadding="3" 
                  PenColor="Silver"
                  ActivityColor="White"/>
            </Button>
          </ClientManagerControls:FacebookImageDragContainer>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

  <Style TargetType="{x:Type FacebookClient:FriendButton}" x:Key="SmallFriendButtonStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type FacebookClient:FriendButton}">
          <ClientManagerControls:FacebookImageDragContainer FacebookImage="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Friend.Image}">
            <Button x:Name="ActivityButton"
                VerticalAlignment="Top"
                RenderTransformOrigin="0.5,0.5"
                Command="{TemplateBinding Command}"
                CommandParameter="{TemplateBinding CommandParameter}"
                Style="{DynamicResource AnimatedItemButton}"
                RenderTransform="{DynamicResource FriendRenderTransform}">
              <FacebookClient:ShinyImageControl
                Width="64" Height="64" 
                FacebookImage="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Friend.Image}"
                ShowGlare="False" 
                FacebookImageDimensions="Normal" 
                CornerRadius="2" 
                ImagePadding="2"
                ActivityColor="White"/>
            </Button>
          </ClientManagerControls:FacebookImageDragContainer>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

  <!-- Currently only used in the album thumbnail overlay. -->
  <Style TargetType="{x:Type FacebookClient:FriendButton}" x:Key="SquareFriendButtonStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type FacebookClient:FriendButton}">
            <Button x:Name="ActivityButton"
                RenderTransformOrigin="0.5,0.5"
                Command="{TemplateBinding Command}"
                CommandParameter="{TemplateBinding CommandParameter}"
                Style="{DynamicResource AnimatedItemButton}"
                RenderTransform="{DynamicResource FriendRenderTransform}">
              <FacebookClient:ShinyImageControl
                  Width="50" Height="50" 
                  FacebookImage="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Friend.Image}"
                  ShowGlare="False" 
                  FacebookImageDimensions="Square" 
                  CornerRadius="2" 
                  ImagePadding="1"
                  ActivityColor="White"/>
            </Button>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

  <Style TargetType="{x:Type FacebookClient:FriendButton}" x:Key="SquareCommentFriendButtonStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type FacebookClient:FriendButton}">
          <ClientManagerControls:FacebookImageDragContainer FacebookImage="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Friend.Image}">
            <Button x:Name="ActivityButton"
                VerticalAlignment="Top"
                RenderTransformOrigin="0.5,0.5"
                Command="{TemplateBinding Command}"
                CommandParameter="{TemplateBinding CommandParameter}"
                Style="{DynamicResource AnimatedItemButton}"
                RenderTransform="{DynamicResource CommentRenderTransform}">
              <FacebookClient:ShinyImageControl
                  Width="50" Height="50" 
                  FacebookImage="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Friend.Image}"
                  ShowGlare="False" 
                  FacebookImageDimensions="Square" 
                  CornerRadius="2" 
                  ImagePadding="1"
                  ActivityColor="White"/>
            </Button>
          </ClientManagerControls:FacebookImageDragContainer>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

  <Style TargetType="{x:Type FacebookClient:FriendButton}" x:Key="TinyFriendButtonStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type FacebookClient:FriendButton}">
          <ClientManagerControls:FacebookImageDragContainer FacebookImage="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Friend.Image}">
            <Button x:Name="ActivityButton"
                VerticalAlignment="Top"
                RenderTransformOrigin="0.5,0.5"
                Command="{TemplateBinding Command}"
                CommandParameter="{TemplateBinding CommandParameter}"
                Style="{DynamicResource AnimatedItemButton}"
                RenderTransform="{DynamicResource FriendRenderTransform}">
              <FacebookClient:ShinyImageControl
                Width="38" Height="38" 
                FacebookImage="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Friend.Image}"
                ShowGlare="False" 
                FacebookImageDimensions="Square" 
                CornerRadius="0" 
                ImagePadding="1"
                ActivityColor="White"/>
            </Button>
          </ClientManagerControls:FacebookImageDragContainer>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

  <!-- TODO: Adapt this template so it doesn't flow outside the layout.  Clipping will occur. -->
  <ControlTemplate x:Key="AlbumThumbnailTemplate" TargetType="{x:Type FacebookClient:AlbumThumbnailButton}">
    <Button DataContext="{TemplateBinding FacebookPhotoAlbum}"
        Command="{TemplateBinding Command}"
        CommandParameter="{TemplateBinding CommandParameter}" >
      <Button.Template>
        <ControlTemplate TargetType="{x:Type Button}">
          <ContentPresenter Focusable="False"/>
        </ControlTemplate>
      </Button.Template>
      <Button.ToolTip >
        <StackPanel>
          <TextBlock  Text="{Binding Owner.Name}"/>
          <TextBlock Text="{Binding Path=LastModified, Converter={StaticResource DateTimeConverter}}"/>
        </StackPanel>
      </Button.ToolTip>
      <Grid MaxHeight="160">
        <Grid>
          <Grid Name="EffectGrid" Visibility="Collapsed" HorizontalAlignment="Left" VerticalAlignment="Top">
            <Grid.Effect>
              <DropShadowEffect BlurRadius="0" ShadowDepth="0" Color="{DynamicResource IconDropShadowColor}" Opacity=".5" />
            </Grid.Effect>
            <Grid Width="92" Height="92" HorizontalAlignment="Left" Margin="50,20,0,0" VerticalAlignment="Top">
              <Grid.Style>
                <Style TargetType="{x:Type Grid}">
                  <Setter Property="Visibility" Value="Visible" />
                  <Style.Triggers>
                    <DataTrigger Binding="{Binding Photos.Count}" Value="1">
                      <Setter Property="Visibility" Value="Collapsed" />
                    </DataTrigger>
                    <DataTrigger Binding="{Binding Photos.Count}" Value="2">
                      <Setter Property="Visibility" Value="Collapsed" />
                    </DataTrigger>
                  </Style.Triggers>
                </Style>
              </Grid.Style>
              <Rectangle Fill="White" Margin="0,0,3,3" />
            </Grid>
            <Grid Width="92" Height="92" HorizontalAlignment="Left" Margin="25,20,0,0" VerticalAlignment="Top" RenderTransformOrigin="0.5,0.5">
              <Grid.RenderTransform>
                <RotateTransform Angle="-8"/>
              </Grid.RenderTransform>
              <Grid.Style>
                <Style TargetType="{x:Type Grid}">
                  <Setter Property="Visibility" Value="Visible" />
                  <Style.Triggers>
                    <DataTrigger Binding="{Binding Photos.Count}" Value="1">
                      <Setter Property="Visibility" Value="Collapsed" />
                    </DataTrigger>
                  </Style.Triggers>
                </Style>
              </Grid.Style>
              <Rectangle Fill="White" Margin="0,0,3,3" />
            </Grid>
            <Grid Width="92" Height="92" HorizontalAlignment="Left" Margin="0,15,0,0" VerticalAlignment="Top" RenderTransformOrigin="0.5,0.5">
              <Grid.RenderTransform>
                <RotateTransform Angle="-24"/>
              </Grid.RenderTransform>
              <Rectangle Fill="White" Margin="0,0,3,3" />
            </Grid>

            <Grid Width="50" Height="50" HorizontalAlignment="Left" Margin="85,85,0,0" VerticalAlignment="Bottom" RenderTransformOrigin="0.5,0.5" RenderTransform="{DynamicResource FriendRenderTransform}">
              <Grid.Style>
                <Style TargetType="{x:Type Grid}">
                  <Setter Property="Visibility" Value="Visible" />
                  <Style.Triggers>
                    <DataTrigger Binding="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type FacebookClient:AlbumThumbnailButton}}, Path=ShowOwnerOverlay}" Value="False">
                      <Setter Property="Visibility" Value="Collapsed" />
                    </DataTrigger>
                  </Style.Triggers>
                </Style>
              </Grid.Style>
              <Rectangle Fill="White" Margin="0,0,0,2" />
            </Grid>
          </Grid>
          <Grid HorizontalAlignment="Left" VerticalAlignment="Top">
            <Grid x:Name="ThirdPhotoGrid"
                    Width="92"
                    Height="92"
                    HorizontalAlignment="Left"
                    Margin="50,20,0,0"
                    VerticalAlignment="Top"
                    RenderTransformOrigin="0.5,0.5">
              <Grid.Style>
                <Style TargetType="{x:Type Grid}">
                  <Setter Property="Visibility" Value="Visible" />
                  <Style.Triggers>
                    <DataTrigger Binding="{Binding Photos.Count}" Value="1">
                      <Setter Property="Visibility" Value="Collapsed" />
                    </DataTrigger>
                    <DataTrigger Binding="{Binding Photos.Count}" Value="2">
                      <Setter Property="Visibility" Value="Collapsed" />
                    </DataTrigger>
                  </Style.Triggers>
                </Style>
              </Grid.Style>
              <Grid>
                <Image Source="pack://application:,,,/Resources/Images/photo_background.png" />
                <ClientManagerControls:LargePhotoThumbnailControl 
                    FacebookImage="{Binding Path=ThirdPhoto.Image}"
                    Margin="4,4,6,16" 
                    Focusable="False" 
                    RenderTransformOrigin="0.5,0.5"/>
              </Grid>
            </Grid>

            <Grid x:Name="SecondPhotoGrid"
                Width="92"
                Height="92"
                HorizontalAlignment="Left"
                Margin="25,20,0,0"
                VerticalAlignment="Top"
                RenderTransformOrigin="0.5,0.5">
              <Grid.Style>
                <Style TargetType="{x:Type Grid}">
                  <Setter Property="Visibility" Value="Visible" />
                  <Style.Triggers>
                    <DataTrigger Binding="{Binding Photos.Count}" Value="1">
                      <Setter Property="Visibility" Value="Collapsed" />
                    </DataTrigger>
                  </Style.Triggers>
                </Style>
              </Grid.Style>
              <Grid.RenderTransform>
                <RotateTransform Angle="-8"/>
              </Grid.RenderTransform>
              <Image Source="pack://application:,,,/Resources/Images/photo_background.png" />
              <ClientManagerControls:LargePhotoThumbnailControl
                  Margin="4,4,6,16" 
                  FacebookImage="{Binding Path=SecondPhoto.Image}"
                  Focusable="False"
                  RenderTransformOrigin="0.5,0.5"/>
            </Grid>
            <Grid
                Width="92"
                Height="92"
                HorizontalAlignment="Left"
                Margin="0,15,0,0"
                VerticalAlignment="Top"
                RenderTransformOrigin="0.5,0.5">
              <Grid.RenderTransform>
                <RotateTransform Angle="-24"/>
              </Grid.RenderTransform>
              <Image Source="pack://application:,,,/Resources/Images/photo_background.png"/>
              <ClientManagerControls:LargePhotoThumbnailControl
                Margin="4,4,6,16"
                FacebookImage="{Binding Path=FirstPhoto.Image}"
                FacebookImageDimensions="Normal"
                Focusable="False"
                RenderTransformOrigin="0.5,0.5"/>
            </Grid>
          </Grid>
          <Grid HorizontalAlignment="Left" VerticalAlignment="Top">
            <Grid.Style>
              <Style TargetType="{x:Type Grid}">
                <Setter Property="Visibility" Value="Visible" />
                <Style.Triggers>
                  <DataTrigger Binding="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type FacebookClient:AlbumThumbnailButton}}, Path=ShowOwnerOverlay}" Value="False">
                    <Setter Property="Visibility" Value="Collapsed" />
                  </DataTrigger>
                </Style.Triggers>
              </Style>
            </Grid.Style>

            <FacebookClient:FriendButton 
                Friend="{Binding Owner}"
                IsEnabled="False"
                HorizontalAlignment="Left" 
                Margin="85,85,0,0"
                VerticalAlignment="Bottom"
                Style="{DynamicResource SquareFriendButtonStyle}" >
            </FacebookClient:FriendButton>
          </Grid>
          <Grid.Triggers>
            <EventTrigger RoutedEvent="Mouse.MouseEnter">
              <BeginStoryboard>
                <Storyboard>
                  <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="EffectGrid" Storyboard.TargetProperty="(UIElement.Visibility)">
                    <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Visible}" />
                  </ObjectAnimationUsingKeyFrames>
                  <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="EffectGrid"  Storyboard.TargetProperty="(UIElement.Effect).(DropShadowEffect.BlurRadius)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.0000000" Value="0"/>
                  </DoubleAnimationUsingKeyFrames>
                  <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="EffectGrid"  Storyboard.TargetProperty="(UIElement.Effect).(DropShadowEffect.ShadowDepth)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.0000000" Value="0"/>
                  </DoubleAnimationUsingKeyFrames>
                  <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="EffectGrid" Storyboard.TargetProperty="(UIElement.Effect).(DropShadowEffect.BlurRadius)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.0900000" Value="3"/>
                  </DoubleAnimationUsingKeyFrames>
                  <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="EffectGrid" Storyboard.TargetProperty="(UIElement.Effect).(DropShadowEffect.ShadowDepth)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.0900000" Value="3"/>
                  </DoubleAnimationUsingKeyFrames>
                  <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="EffectGrid" Storyboard.TargetProperty="(UIElement.Effect).(DropShadowEffect.BlurRadius)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.2200000" Value="6"/>
                  </DoubleAnimationUsingKeyFrames>
                  <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="EffectGrid" Storyboard.TargetProperty="(UIElement.Effect).(DropShadowEffect.ShadowDepth)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.2200000" Value="6"/>
                  </DoubleAnimationUsingKeyFrames>
                </Storyboard>
              </BeginStoryboard>
            </EventTrigger>
            <EventTrigger RoutedEvent="Mouse.MouseLeave">
              <BeginStoryboard>
                <Storyboard>
                  <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="EffectGrid" Storyboard.TargetProperty="(UIElement.Visibility)">
                    <DiscreteObjectKeyFrame KeyTime="00:00:00.25" Value="{x:Static Visibility.Collapsed}" />
                  </ObjectAnimationUsingKeyFrames>
                  <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="EffectGrid" Storyboard.TargetProperty="(UIElement.Effect).(DropShadowEffect.BlurRadius)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.0000000" Value="6"/>
                  </DoubleAnimationUsingKeyFrames>
                  <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="EffectGrid" Storyboard.TargetProperty="(UIElement.Effect).(DropShadowEffect.ShadowDepth)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.0000000" Value="6"/>
                  </DoubleAnimationUsingKeyFrames>
                  <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="EffectGrid" Storyboard.TargetProperty="(UIElement.Effect).(DropShadowEffect.BlurRadius)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.0900000" Value="3"/>
                  </DoubleAnimationUsingKeyFrames>
                  <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="EffectGrid" Storyboard.TargetProperty="(UIElement.Effect).(DropShadowEffect.ShadowDepth)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.0900000" Value="3"/>
                  </DoubleAnimationUsingKeyFrames>
                  <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="EffectGrid" Storyboard.TargetProperty="(UIElement.Effect).(DropShadowEffect.BlurRadius)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.2200000" Value="0"/>
                  </DoubleAnimationUsingKeyFrames>
                  <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="EffectGrid" Storyboard.TargetProperty="(UIElement.Effect).(DropShadowEffect.ShadowDepth)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.2200000" Value="0"/>
                  </DoubleAnimationUsingKeyFrames>
                </Storyboard>
              </BeginStoryboard>
            </EventTrigger>
          </Grid.Triggers>
        </Grid>
        <StackPanel VerticalAlignment="Bottom" Orientation="Vertical">
          <TextBlock
              HorizontalAlignment="Left" FontFamily="{DynamicResource SansSerifFont}" FontSize="{DynamicResource SmallFontSize1}" FontWeight="Light"
              Foreground="{DynamicResource AlbumInfoForeground}">
            <TextBlock.Style>
              <Style TargetType="{x:Type TextBlock}">
                <Setter Property="Text">
                  <Setter.Value>
                    <Binding StringFormat="{}{0} photos" Path="Photos.Count"/>
                  </Setter.Value>
                </Setter>
                    
                <Style.Triggers>
                  <DataTrigger Binding="{Binding Path=Photos.Count}" Value="1">
                    <Setter Property="Text" Value="1 photo" />
                  </DataTrigger>
                </Style.Triggers>
              </Style>
            </TextBlock.Style>
          </TextBlock>
          <TextBlock
              HorizontalAlignment="Left" 
              FontFamily="{DynamicResource SansSerifFont}" 
              FontSize="{DynamicResource SmallFontSize1}" 
              FontWeight="Light"
              Foreground="{DynamicResource AlbumInfoForeground}"                
              Margin="0,2,0,0"
              TextTrimming="CharacterEllipsis"
              Text="{Binding Path=Title}"/>
        </StackPanel>
      </Grid>
    </Button>
  </ControlTemplate>

  <Style TargetType="{x:Type FacebookClient:AlbumThumbnailButton}">
    <Setter Property="Cursor" Value="Hand"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="Panel.ZIndex" Value="1"/>
    <Setter Property="Template" Value="{StaticResource AlbumThumbnailTemplate}"/>
  </Style>

  <Style TargetType="{x:Type FacebookClient:PhotoButton}" x:Key="SmallPhotoButtonStyle">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type FacebookClient:PhotoButton}">
          <Button
              RenderTransformOrigin=".5,.5"
              Command="{TemplateBinding Command}"
              CommandParameter="{TemplateBinding CommandParameter}"
              Style="{DynamicResource AnimatedItemButton}">
            <Grid Width="92" Height="92" Margin="2.5">
              <Image Name="Placeholder" Source="pack://application:,,,/Resources/Images/photo_background.png" />
              <ClientManagerControls:FacebookImageControl FacebookImage="{TemplateBinding Photo}" FacebookImageDimensions="Small">
                <ClientManagerControls:FacebookImageControl.Template>
                  <ControlTemplate TargetType="{x:Type ClientManagerControls:FacebookImageControl}">
                    <Border Margin="4,4,6,16">
                      <Image Source="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ImageSource}" />
                    </Border>
                  </ControlTemplate>
                </ClientManagerControls:FacebookImageControl.Template>
              </ClientManagerControls:FacebookImageControl>
            </Grid>
          </Button>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

</ClientManagerView:EventResourceDictionary>